package com.itboye.shop.me.qianbao;

import android.content.BroadcastReceiver;
import android.content.Context;
import android.content.Intent;
import android.content.IntentFilter;
import android.os.Bundle;
import android.view.View;
import android.widget.ImageView;
import android.widget.RelativeLayout;
import android.widget.TextView;

import com.itboye.shop.R;
import com.itboye.shop.base.BaseActivity;

/**
 * 支付密码重置
 */
public class ZhiFuPassChongZhiActivity extends BaseActivity {
    TextView tvTitle;
    ImageView back;

    RelativeLayout chongzhi_jide,chongzhi_wangji;
    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_zhi_fu_pass_chong_zhi);

        tvTitle.setText("重置支付密码");
        //支付密码修改成功的广播
        IntentFilter intentFilterExit = new IntentFilter(JiDePassTwoActivity.ZHI_FU_PASS_OK);
        registerReceiver(xiugaiPassBroadcastReceiver, intentFilterExit);
    }
    BroadcastReceiver xiugaiPassBroadcastReceiver = new BroadcastReceiver() {
        public void onReceive(Context context, Intent intent) {
            finish();
        };
    };

    @Override
    protected void onDestroy() {
        super.onDestroy();
        unregisterReceiver(xiugaiPassBroadcastReceiver);
    }
    @Override
    public void onClick(View view) {
        Intent intent=null;
        switch (view.getId()) {
            case R.id.back:
                finish();
                break;
            case R.id.chongzhi_jide://记得旧密码
                intent=new Intent(this, JiDeZhiFuPassActivity.class);
                startActivity(intent);
                break;
            case R.id.chongzhi_wangji://忘记旧密码
                intent=new Intent(this, WangJiZhiFuPassActivity.class);
                startActivity(intent);
                break;
            default:
                break;
        }
    }
}
